package pl.edu.agh.neuraleconomy.ui.chart;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import lombok.Data;

@Data
public class SerieBean {
	private String serieName = "";
	private List<Date> timeLine = new LinkedList<Date>();
	private List<Double> values = new LinkedList<Double>();
	PredictionSerieBean predictionSerie;
	
	public void addValue(Date date, Double value){
		if(value == null){
			if(values.isEmpty()){
				return;
			}
			
			values.add(new Double(values.get(values.size()-1)));
		}else{
			values.add(value);
		}
		
		timeLine.add(date);
	}
}
